#include<stdio.h>

int numberof(int n)
{
	int count = 0;
	while (n)
	{
	n = n & (n - 1);
	count++;
	}
	return count;
}

int main()
{
	int n = 15;
	int ret = numberof(n);
	printf("%d\n", ret);
	return 0;
}